package com.jh.controller;

import com.jh.pojo.Emp;
import com.jh.pojo.EmpQueryParam;
import com.jh.pojo.Result;
import com.jh.pojo.ResultPage;
import com.jh.service.EmpService;
import com.jh.service.impl.EmpServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/emps")
public class EmpController {

    @Autowired
    private EmpService empService;

    @GetMapping
    public Result listPage(EmpQueryParam empQueryParam){
      log.info("列表查询"+empQueryParam);
      ResultPage<Emp> list=empService.listPage(empQueryParam);
      return Result.success(list);
    }



}
